package com.pangyangyang.elasticsearch.plugin.jdbc.handler.action;

import org.apache.commons.lang.StringUtils;

/**
 * Created by yangwang on 2015/1/22.
 */
public enum JDBCQueryHandlerActionType {

    INDEX,
    DELETE;

    public static JDBCQueryHandlerActionType fromString(String type){
        if(StringUtils.equals("index", type)){
            return INDEX;
        }
        if(StringUtils.equals("delete", type)){
            return DELETE;
        }

        return null;
    }
}
